package com.lancoo.ccas52.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lancoo.ccas52.entity.Room;
import com.lancoo.ccas52.pojo.common.PageInfo;
import com.lancoo.ccas52.pojo.dto.Building;
import com.lancoo.ccas52.pojo.response.digitization.BuildingInfo;
import com.lancoo.ccas52.pojo.vo.Campus;
import com.lancoo.ccas52.pojo.vo.RoomTypeDto;

import java.util.List;

/**
 * <p>
 * 教室 服务类
 * </p>
 *
 * @author quin.song
 * @since 2023-03-01
 */
public interface RoomService extends IService<Room> {

    void syncRooms(Integer taskId, String schoolId,String term, List<BuildingInfo> buildingInfos);

    /**
     * 获取 教室类型
     * @param schoolId
     * @param term
     * @param type
     * @return
     */
    List<RoomTypeDto> getRoomType(String schoolId, String term, Integer type);


    List<Building> getBuilding(String schoolId,String term);

    List<Integer> getFloor(String schoolId,String term,Integer buildingId);

    /**
     * 根据教室表去重获取学院
     * @param taskId
     * @return
     */
    List<Campus> getCampusList(Integer taskId);

    /**
     * 获取教室列表 包含禁用规则
     * @param page
     * @param campusId
     * @param buildingId
     * @param buildingFloor
     * @param roomType
     * @param keyword
     * @return
     */
    PageInfo<Room> getRoomList(IPage<Room> page, String schoolId,String term,String collegeId, String campusId, Integer buildingId, Integer buildingFloor, Integer roomType, String keyword, Integer state,Integer isEnable);

    /**
     * 获取教室列表
     * @param buildingId
     * @param buildingFloor
     * @param keyword
     * @return
     */
    List<Room> getRoomSimpleList(String schoolId,String term, Integer buildingId, Integer buildingFloor, String keyword, String campusId,Integer roomType,Integer taskId,Integer isEnable,String collegeId);


    List<Integer> getRoomTypeUsed(String schoolId, String term);
}
